<?php       
        require_once("../inc/models/customer_model.php");
        if(isset($_POST['submit']))
        {   	       	    
                $row = $_POST;
                SaveCustomer($row);
                header("Location: index.php");
        }
        else
		{			
            $results = GetCustomer($_REQUEST['id']);
		}
?>
<!DOCTYPE html>
<html lang="en">
        <?php include('../inc/header.php'); ?>
        <body>
        <?php include('../inc/navigation.php'); ?>
        <div class="span9">
        	<div class="row-fluid">
        		<h2>Edit Customer</h2>          
                <form class="form-horizontal" method="post" action="#">
                        <input type="hidden" name="id" value="<?=$_GET['id']?>" />
                    <div class=" control-group">
                        <label class="control-label" for="FirstName">First Name:</label>
                        <div class="controls">
                            <input type="text" name="FirstName" id="FirstName" value="<?=$results['FirstName']?>" />
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="LastName">Last Name:</label>
                        <div class="controls">
                            <input type="text" name="LastName" id="LastName" value="<?=$results['LastName']?>" />
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="created_at">created_at:</label>
                        <div class="controls">
                            <input type="text" name="created_at" id="created_at" value="<?=$results['created_at']?>" />
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="updated_at">updated_at:</label>
                        <div class="controls">
                            <input type="text" name="updated_at" id="updated_at" value="<?=$results['updated_at']?>" />
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="Keyword_id">Keyword_id:</label>
                        <div class="controls">
                            <input type="text" name="Keyword_id" id="Keyword_id" value="<?=$results['Customer_keywords_id']?>" />
                        </div>
                    </div>
                    <input type="submit" name="submit" value="Save" />
                </form>
           </div>
       </div>
       <!-- All Bootstrap JavaScript Files -->
       <script src="../inc/bootstrap/js/jquery.js"></script>
       <script src="../inc/bootstrap/js/bootstrap.js"></script>
	</body>
</html>
